<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<sj:head locale="es" jqueryui="true" jquerytheme="cupertino" />
<link rel="stylesheet" type="text/css" href="estilo/style.css" />
<script type="text/javascript" src="scripts/ajax.js" ></script>
<script type="text/javascript" src="scripts/carga_ajax.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Asignacion de Prospecto...</title>
<script>

	function activarPorAsignar(id){
		var control;
		control=document.getElementById(id).value="POR ASIGNAR";
		if(control=="POR ASIGNAR"){
			document.getElementById('imagen_').src="images/check.gif";
			document.getElementById('imagen').src="images/add.gif";
			
		}
	}
	
	function activarEnProceso(id){
		var control;
		control=document.getElementById(id).value="EN PROCESO";
		if(control=="EN PROCESO"){	
			document.getElementById('imagen').src="images/check.gif";
			document.getElementById('imagen_').src="images/add.gif";
				
		}		
	}
	
   function maximizar() { 
		self.moveTo(0,0); 
		self.resizeTo(screen.availWidth,screen.availHeight); 
	} 

</script>
</head>
<body onload="maximizar(); activarPorAsignar('pros_status');">
<div class='logo_sia'><img src="images/logo.png" /></div>
<br/>
<br/>
<table>
  <tr  VALIGN=TOP>
      <td  >
     <div class="barra_tit_corp" align='center'>Asignar Prospecto</div>
     <br/>
<br/>
	<s:form theme="simple" action="asignar_prospecto">
	<s:fielderror name="general"></s:fielderror>
	<div class="mnu_asig_pros" >
	<table align="center" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td>
				<table width="65%" align="center" border="0" cellspacing="0" cellpadding="0">
				
					<tr>
						<td align="center">
							<h2><strong><s:actionmessage name="msg_general"/></strong></h2>
							<font color="#FF0000" ><strong><s:actionerror name="msg_error"/></strong></font>
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
					</tr>
					<tr align="left">
						<td width="20%">
						<s:reset cssClass='button' value="Nuevo"></s:reset>
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							<s:submit value="Asignar" cssClass='button'></s:submit>
						</td>
						<td>
							&nbsp;
						</td>
					</tr>
					<tr>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
					</tr>
					<tr>
						<td colspan="4"> 
							<table width="100%" cellpadding="0" cellspacing="0" border="0">
							
								<tr>
									<td align="left" width="10%" >
										
									
									</td>
									<td height="10%">
										&nbsp;
									</td>
									<td width="50%">
											&nbsp;
									</td>
								</tr>
						       <tr>
									<td class='tabla_th1' align="left" width="10%" >
										Status
									</td>
									<td width="50%" class='tabla_celda1'>
									        <s:url id="car_0" value="listar_prospectos_no_asignado.action" />
										    <sj:a id="rpt_com_1"  name="a" href="%{car_0}" targets="listas_" onclick="activarPorAsignar('pros_status')"  >
									 		<img alt="" border="0" src="images/add.gif" name='prost_tipo' id="imagen_" >Por Asignar
											</sj:a>
											<s:url id="car_2" value="listar_prospectos_en_proceso.action" />
											<sj:a id="rpt_com_2"  name="a" href="%{car_2}" targets="listas_" onclick="activarEnProceso('pros_status')" >
									 		<img alt="" border="0" src="images/add.gif" name='prost_tipo' id="imagen" >En Proceso
											</sj:a>
									</td>
								</tr>
								<tr>
									<td align="left" width="100%" colspan='4'>
										<s:url id="car_1" value="listar_prospectos_no_asignado.action" />
										<sj:div href="%{car_1}" indicator="indicatorc" id="listas_">
											<img id="indicatorc" src="images/ajax-loader3.gif" alt="Cargando..." style="display: none" />
										</sj:div>
										<s:hidden name="pros_status" id="pros_status"></s:hidden>
									</td>
								</tr>
								<tr>
									<td colspan="4">
									&nbsp;
									</td>
								</tr>
								<tr>
									<td align="right" class='tabla_th1'>
										Vendedor:&nbsp;
									</td>
									<td align="left" colspan="2" class='tabla_celda1'>
									
										
										<s:url id="remoteurl" action="cargar_vendedores_corp" /> 
										<sj:select href="%{remoteurl}" 
											name="cod_vendedor" 
											id="vend" 
											headerKey="-1" 
											headerValue="Seleccione" 
											list="vendedores" 
											indicator="progreso_"
											listKey='cod' listValue='descripcion'
										/>
										<img id="progreso_" src="images/ajax-loader3.gif" alt="Cargando..." style="display: none" />
									</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td colspan="4">
							&nbsp;
						</td>
					</tr>
					<tr>
						<td class='tabla_th1'>
							Observaciones
						</td>
						<td>
							&nbsp;
						</td>
					</tr>
					<tr>
						<td class='tabla_celda1'>
						
							<s:textarea name="obs" id="observaciones" cols="40"></s:textarea>
						</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td>
				&nbsp;
			</td>
		</tr>
	</table>
</div>
</s:form>
  </td>
      <td>
		 <IFRAME src="verg.action" width="600" height="600" scrolling="no" frameborder="0">
     </td>
</tr>
</table>
</body>
</html>